$(function () {
    findCuisineData();
});

function findCuisineData() {
    $.ajax({
        url: '/front/cuisine/findAll',
        data: {},
        type: 'get',
        dataType: 'json',
        success: function (res) {
            console.log(res);
            setCuisineList(res.cuisineModelList);

        }
    })
}

function setCuisineList(data) {
    let html = '';
    data.forEach(function (elem, index) {
        html += '<div onclick="findProductAll(' + elem.id + ')">' + elem.name + '</div>';
    })
    $("#cuisine").html(html);
    findProductAll(0);
}